﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="ThanhToan.aspx.cs" Inherits="ThanhToan" Title="Thanh Toán" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<table>
<thead>
    <th>Nhap thong tin nguoi nhan</th>
</thead>
<tbody>

<tr>
<td>Dia chi:</td>
<td>
    <asp:TextBox ID="DiaChi" runat="server" Width="250"></asp:TextBox></td>
</tr>
<tr>
<td>So dien thoai:</td>
<td>
    <asp:TextBox ID="SoDienThoai" runat="server" Width="250"></asp:TextBox></td>

</tr>
<tr>
<td>Email:</td>

<td>
    <asp:TextBox ID="Email" runat="server" Width="250"></asp:TextBox></td>
</tr>

<tr>

<td colspan="2">
    <asp:Button ID="Button1" runat="server" Text="Thanh Toán" 
        onclick="Button1_Click" />
    <asp:Button ID="Button2" runat="server" Text="Nhập Lại" />
    </td>
</tr>

</tbody>

</table>

<asp:ListView ID="ListView1" runat="server" DataKeyNames="IDTaiLieu" 
                                                   >
                                                  
                                                   <LayoutTemplate>
                                                       
                                                                   <table ID="itemPlaceholderContainer" runat="server" border="1" 
                                                                       style="">
                                                                       <tr id="Tr1" runat="server" style="">
                                                                           <th id="Th3" runat="server">
                                                                               Công cụ</th>
                                                                           <th id="Th1" runat="server">
                                                                               Mã</th>
                                                                           <th id="Th2" runat="server">
                                                                               Tên tài liệu</th>
                                                                           <th id="Th6" runat="server">
                                                                               Số luợng</th>
                                                                           <th id="Th4" runat="server">
                                                                               Đơn giá</th>
                                                                           <th id="Th5" runat="server">
                                                                               Thành tiền</th>
                                                                              
                                                                       </tr>
                                                                       <tr ID="itemPlaceholder" runat="server">
                                                                       </tr>
                                                                       <tr>
                                                                       <td colspan="5">Tổng tiền (VNĐ):</td>
                                                                       <td> 
                                                                          <%=format_tt(tong_tien.ToString()) %> 
                                                                          <!-- <asp:Label ID="tong_tien" runat="server" Text='<%= DateTime.Now.ToShortDateString() %>'></asp:Label> -->
                                                                           </td>
                                                                       </tr>
                                                                       
                                                                   </table>
                                                              
                                                   </LayoutTemplate>
                                                   <InsertItemTemplate>
                                                       <tr style="">
                                                           <td>
                                                               <asp:Button ID="InsertButton" runat="server" CommandName="Insert" 
                                                                   Text="Insert" />
                                                               <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" 
                                                                   Text="Clear" />
                                                           </td>
                                                           <td>
                                                               &nbsp;</td>
                                                           <td>
                                                               <asp:TextBox ID="TenTLTextBox" runat="server" Text='<%# Bind("TenTL") %>' />
                                                           </td>
                                                           <td>
                                                               <asp:TextBox ID="DonGiaTextBox" runat="server" Text='<%# Bind("DonGia") %>' />
                                                           </td>
                                                       </tr>
                                                   </InsertItemTemplate>
                                                   <SelectedItemTemplate>
                                                       <tr style="background-color:#008A8C;font-weight: bold;color: #FFFFFF;">
                                                           <td>
                                                               <asp:Label ID="IDTaiLieuLabel" runat="server" Text='<%# Eval("IDTaiLieu") %>' />
                                                           </td>
                                                           <td>
                                                               <asp:Label ID="TenTLLabel" runat="server" Text='<%# Eval("TenTL") %>' />
                                                           </td>
                                                           <td>
                                                               <asp:Label ID="DonGiaLabel" runat="server" Text='<%# Eval("DonGia") %>' />
                                                           </td>
                                                       </tr>
                                                   </SelectedItemTemplate>
                                                   <EmptyDataTemplate>
                                                       <table id="Table1" runat="server" 
                                                           style="background-color: #FFFFFF;border-collapse: collapse;border-color: #999999;border-style:none;border-width:1px;">
                                                           <tr>
                                                               <td>
                                                                   No data was returned.</td>
                                                           </tr>
                                                       </table>
                                                   </EmptyDataTemplate>
                                                   <EditItemTemplate>
                                                       <tr style="background-color:#008A8C;color: #FFFFFF;">
                                                           <td>
                                                               <asp:Button ID="UpdateButton" runat="server" CommandName="Update" 
                                                                   Text="Update" />
                                                               <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" 
                                                                   Text="Cancel" />
                                                           </td>
                                                           <td>
                                                               <asp:Label ID="IDTaiLieuLabel1" runat="server" 
                                                                   Text='<%# Eval("IDTaiLieu") %>' />
                                                           </td>
                                                           <td>
                                                               <asp:TextBox ID="TenTLTextBox" runat="server" Text='<%# Bind("TenTL") %>' />
                                                           </td>
                                                           <td>
                                                               <asp:TextBox ID="DonGiaTextBox" runat="server" Text='<%# Bind("DonGia") %>' />
                                                           </td>
                                                       </tr>
                                                   </EditItemTemplate>
                                                   <ItemTemplate>
                                                       <tr style="">
                                                       <td>
                                                           <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="Image/del.png" Text="Del" CommandName="del_bt" CommandArgument='<%# Eval("IDTaiLieu") %>'/>
                                                           </td>
                                                       
                                                           
                                                           <td>
                                                               <asp:Label ID="IDTaiLieuLabel" runat="server" Text='<%# Eval("IDTaiLieu") %>' />
                                                           </td>
                                                           <td>
                                                               <asp:Label ID="TenTLLabel" runat="server" Text='<%# Eval("TenTL") %>' />
                                                           </td>
                                                           <td>
                                                            <asp:Label ID="Label1" runat="server" Text='<%# Eval("SoLuong") %>' />

                                                               
                                                           </td>
                                                           <td>
                                                               <asp:Label ID="DonGiaLabel" runat="server" Text='<%# format_tt(Eval("DonGia").ToString()) %>' />
                                                           </td>
                                                               
                                                               <td><%# format_tt(Eval("ThanhTien").ToString())%>
                                                               
                                                           </td>
                                                             
                                                           
                                                       </tr>
                                                   </ItemTemplate>
                                               </asp:ListView>
    <asp:Label ID="Result" runat="server" Text="Label" Visible="false"></asp:Label>
    
    <asp:SqlDataSource ID="SqlDataSource1" runat="server"
    ConnectionString="<%$ ConnectionStrings:ConnectionStringMembership %>"
    InsertCommand=""
    ></asp:SqlDataSource>
</asp:Content>

